<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" class="pageHeading"><?=$this->pageTitle?></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="middle" height="40">Hello <strong><?=$this->UserData['userName']?></strong> Please select your subscription plan below:</td>
</tr>
<tr>
<td align="center" valign="top"><form name="myform" id="myform" action="<?php echo $this->url(array('controller'=>'signup', 'action'=>'setselectedplan','requestNo'=>$this->requestNo), 'default', true)?>" method="post"><table width="100%" cellpadding="5" cellspacing="5">
<tr>
<?
if($this->planData!="" and count($this->planData)>0)
{ 
	$i=1;
	$firstPlanId="";
	foreach($this->planData as $key=>$planData)
	{
		$className="plan_normal";		
		if(@$_REQUEST['selected_plan_id']==$planData['plan_id'])
		{
			$className="plan_selected";	
		}
		else
		{
			if($i==1 && $_REQUEST['selected_plan_id']=="")
			{
				$className="plan_selected";
				$firstPlanId=$planData['plan_id'];
			}
		}
?>
<td align="left" valign="top" class="<?=$className?>" id="Plan_<?=$i?>" onclick="SetPlan('<?=$planData['plan_id']?>','<?=$i?>')" width="25%"><table width="100%" cellpadding="2" cellspacing="2">
<tr>
<td align="center" valign="top">
<?
if($planData['plan_image']!="" and file_exists(SITE_ROOT.'images/planimg/'.$planData['plan_image']))
{
?>
<img src="<?=APPLICATION_URL?>image.php?image=<?='images/planimg/'.$planData['plan_image']?>&height=100&width=100" border="0" style="border: solid 1px #cccccc;padding:2px;" />
<?	
}
else
{
?>
<img src="<?=APPLICATION_URL?>image.php?image=images/no_image2.jpg&height=100&width=100" border="0" style="border: solid 1px #cccccc;padding:2px;" />
<?	
}
?>
</td>
</tr>
<tr>
<td align="left" valign="top" class="blueHead"><?=$planData['plan_name']?> (
<?
if($planData['is_free']=='1')
{
	echo "Free";
}
else
{
	echo PRICE_SYMBOL.$planData['plan_price'];
}?>
)</td>
</tr>
<tr>
<td align="left" valign="top" class="directory_text">You Can Upload<br /><span class="blue_normal_13"><?=$planData['nof_images']?> Images</span></td>
</tr>
<tr>
<td align="left" valign="top" class="directory_text">For Business Description You will have<br /><span class="blue_normal_13"><?
if($planData['des_box']==1)
{
	echo "Textbox";	
}
else
{
	echo "Html Editor";
}
?></span></td>
</tr>
<?
if($planData['is_free']=='0')
{
?>
<tr>
<td align="left" valign="top" class="directory_text">Subscription Validity<br /><span class="blue_normal_13"><?=$planData['plan_validity']." Month";?></span></td>
</tr>
<?
}
?>
<?
if($planData['featured_business']=='1')
{
?>
<tr>
<td align="left" valign="top" class="directory_text">Listed on the Featured Business</td>
</tr>
<?
}
?>
<?
if($planData['offer_coupons']=='1')
{
?>
<tr>
<td align="left" valign="top" class="directory_text">Offer Coupons</td>
</tr>
<?
}
?>
</table></td>
<?
	if($i%3==0)
	{
		echo "</tr><tr><td colspan='3'>&nbsp;</td></tr><tr>";
	}
	$i++;
	}
	if(count($this->planData)<4)
	{
		for($j=1;$j<=(4-count($this->planData));$j++)
		{
			echo '<td align="left" valign="top"  width="25%">&nbsp;</td>';
		}
		
	}
}
?>
</tr>
<tr>
<td align="center" valign="top" colspan="4"><input type="submit" name="Continue" id="Continue" value="Continue" class="myButton" /></td>
</tr>
</table><input type="hidden" name="selected_plan_id" id="selected_plan_id" value="<?=$firstPlanId?>" /></form></td>
</tr>
</table>
<script language="javascript">
function SetPlan(planId,planNum)
{
	var totPlan='<?=count($this->planData)?>';
	for(var i=1;i<=totPlan;i++)
	{
	document.getElementById('Plan_'+i).className="plan_normal";	
	}
	document.getElementById('Plan_'+planNum).className="plan_selected";
	document.getElementById('selected_plan_id').value=planId;
}
</script>